//const isRelease = process.env.NODE_ENV === 'production';
const isRelease = true;
/**Web 服务端口 */
const serverPort = isRelease ? 8080 : 8080;

const dev_dbConfig = {
    host: '47.108.218.17',
    user: 'root',
    port: '3306',
    password: 'whw@2023',
    database: 'yyjc',
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0,
}
const pro_dbConfig = {
    host: '127.0.0.1',
    user: 'root',
    port: '3306',
    password: 'whw@2023',
    database: 'yyjc',
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0,
}
const dev_mqttConfig = {
    host: '47.108.218.17',
    port: 1883,
    username: 'admin',
    password: '!QAZ2wsx',
}
const pro_mqttConfig ={
    host: '127.0.0.1',
    port: 1883,
    username: 'admin',
    password: '!QAZ2wsx',
}

/**数据库配置 */
const dbConfig = isRelease ? pro_dbConfig : dev_dbConfig;

const mqttConfig = isRelease ? pro_mqttConfig : dev_mqttConfig;

export {
    isRelease, 
    serverPort, 
    dbConfig,
    mqttConfig

}